package com.example.campus.api_controller;


import com.example.campus.dto.SampleDto;
import com.example.campus.page_controller.dto.ResponseResult;
import org.apache.coyote.Response;
import org.springframework.web.bind.annotation.*;


import static com.example.campus.common.BusinessConstants.API_BASE;

/**
 * @desc: 注意：该控制器为 参考样本，实际实现中可以删除本类。
 * @author: Ping
 * @date: 2024/11/1 9:35
 */

@RestController
@RequestMapping(API_BASE + "/samples")
public class SampleController {



    @GetMapping()
    public ResponseResult<String> hello() {

        return ResponseResult.ok("hello world");
    }

    @PostMapping()
    public ResponseResult<SampleDto> hello(@RequestBody SampleDto sampleDto) {

        return ResponseResult.ok(sampleDto);
    }
}
